1. Field of the Invention
The present invention relates to an object, a method, or a manufacturing method. In addition, the present invention relates to a process, a machine, or manufacture. In particular, the present invention relates to, for example, a semiconductor device, a memory device, a display device, a light-emitting device, a power storage device, an electronic device, a driving method thereof, or a manufacturing method thereof. In particular, the present invention relates to a memory device and a semiconductor device using the memory device.
2. Description of the Related Art
In semiconductor devices such as central processing units (CPUs), semiconductor elements have been miniaturized and circuits have been made smaller in size to increase integration degree, and now transistors with a channel length of approximately 30 nm are manufactured. However, the miniaturization of the semiconductor elements increases power consumption (leakage power) due to leakage current of the transistors in the CPUs. Specifically, most of power consumption of conventional CPUs is power consumption (operation power) at the time of calculations, while leakage power accounts for at least 10% of power consumption of CPUs in recent years.
In particular, in a CPU for portable devices such as mobile phones and portable information terminals, registers and buffer memory devices such as caches occupy more than or equal to half a chip area of the CPU or use more than or equal to half the number of transistors; therefore, a reduction in leakage power of the buffer memory devices is highly demanding.
In view of the above, attention has been focused on a technique called “Normally-off Computing” which makes it possible to reduce power consumption by stopping power supply for a short time between processing periods of a processor with the use of power gating and a nonvolatile memory (Non-Patent Document 1).
In Normally-off Computing, a state before the power gating is retained in the nonvolatile memory to allow continuous processing of the processor.
As such a nonvolatile memory, a magnetic element or a ferroelectric element can be used; however, the use of such elements makes the manufacturing process of a semiconductor device complicated.
In addition, CPUs include register files as buffer memory devices. A register file is a circuit that can store data read from a main memory, data obtained during arithmetic processing of an arithmetic logic unit (ALU), data obtained as a result of the arithmetic processing of the ALU, and the like.
The register file includes a plurality of registers and is generally connected to a plurality of latches (Patent Document 1).
For example, Patent Document 1 discloses that a synchronous D-type flip-flop including a master latch that latches output of an OR circuit and a slave latch that follows the master latch is used for a memory portion of the register file.
A latch portion in Patent Document 1 includes a large number of elements and therefore has a problem of an increase in a layout area. When a nonvolatile memory is added to reduce leakage current, the circuit size is further increased.
Because the register file includes a plurality of registers, the layout area of the whole register file increases as the number of elements included in each register increases.